package com.LearnInWorld.service.impl;

import com.LearnInWorld.dao.UserMapper;
import com.LearnInWorld.service.UserService;
import com.LearnInWorld.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public User findUser(String username) {
        User user = userMapper.selectByPrimaryKey(username);
        return user;
    }

    @Override
    public void saveUser(User user) {
        userMapper.insertSelective(user);
    }
}
